<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串模板</title>
</head>
<body>
    <script>
        // 字符串模板
        // ` 反单引号
        var name = '石兴龙' + 
        '1' + 
        '2'

        name = `石兴龙
        1
        2
        `

        var str = `${name} hello word!`
        console.log(str)

        // var url = `/login?username=123&pwd=456`
        // var url_2 = `/download?filename=img.png`;

        // console.log(
        //     url.startsWith('/login')
        // )
        // console.log(
        //     url_2.endsWith('.png')
        // )

    </script>
</body>
</html>